<?php
/* @var $this VideoController */
/* @var $model Video */
Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$.fn.yiiGridView.update('galeri-grid', {
		data: $(this).serialize()
	});
	return false;
});
");


?>
<div class="search-form" style="display:none">
<?php $this->renderPartial('_search',array(
	'model'=>$model,
)); 
?>
</div><!-- search-form -->

<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'video-grid',
	'dataProvider'=>$model->search(),
  //  'enablePagination'=>true,
	'filter'=>$model,
	'columns'=>array(
	/*	array(
            'header' => 'No.',
            'name' => 'no',
            'type' => 'raw',
            'value' => '$data["no"]'
		),
        array(
            'header' => 'Kategori',
            'name' => 'parent_id',
            'type' => 'raw',
            'value' => '$data["kategori"]'
        ),*/
        
        array(
            'header' => 'Nama',
            'name' => 'nama_',
            'type' => 'raw',
            'value' => 'l(e($data["nama_"]),url("/backend/video/update/".$data["video_id"]))'
        ),
        array(
            'header' => 'Status',
            'name' => 'status',
            'type' => 'raw',
            'value' => 'l(e($data["status"] == 1 ? "publish" : "unpublish"),
                url("/backend/video/ubahstatus/".$data["video_id"]))'
        ),
        /*'kategori',
        'nama',
        'isi',
        tatus',
        'tgl_buat',
        'tgl_update',
        'ip_update',
        */
        	array(
			'class'=>'CButtonColumn',
		),

	),
)); ?>
